
package com.mengmeizi.util;

import android.util.Log;

public class LogOut {
    public static final String TAG = "IMAGEREADING";

    private static final boolean ISDEBUG = false;

    public static void out(Object obj, String info) {
        if (ISDEBUG) {
            String tag = TAG;
            if (info.startsWith("length")) {
                tag = TAG + "_TMP";
            }
            if (obj instanceof String) {
                Log.d(tag, ((String) obj) + "->" + info);
            } else {
                Log.d(tag, obj.getClass().toString().substring(6) + "->" + info);
            }
        }
    }

    public static void out(Object obj, String tag, String info) {
        if (ISDEBUG) {
            if (obj instanceof String) {
                Log.d(TAG + "_" + tag, ((String) obj) + "->" + info);
            } else {
                Log.d(TAG + "_" + tag, obj.getClass().toString().substring(6) + "->" + info);
            }
        }
    }
}
